<?php

/**
* Robot class
* keep information for a robot object.
* @author dmq (master@dmq.se)
*/
class Robot
{
	private $type;				// (int), Robot type.
	private $spawnPosX;			// (int), (Re)Spawn X-position.
	private $spawnPosY;			// (int), (Re)Spawn Y-position.
	private $posX;				// (int), Robots current X-position.
	private $posY;				// (int), Robots current Y-position.
	private $direction;			// (int), Robots direction (0,1,2,3 => left,right,top,bottom).
	private $health;			// (int), Robots health points.
	private $lives;				// (int), Robots lives left.
	private $alive;				// (bool), Robots alive status.
	private $register1;			// (int), Card in first register slot.
	private $register2;			// (int), Card in second register slot.
	private $register3;			// (int), Card in third register slot.
	private $register4;			// (int), Card in fourth register slot.
	private $register5;			// (int), Card in fifth register slot.
	private $lockedRegisters;	// (string), Locked register cards.
	private $powerDownStatus;	// (int), Robots power down status.
	private $nextCheckpoint;	//(int), Next checkpoint a robot should go to to win

	/**
    * The constructor
    * @param $type Int containing the type of the robot
	* @param $spawnPosX Int containing the (Re)Spawn X-position of the robot
	* @param $spawnPosY Int containing the (Re)Spawn Y-position of the robot
	* @param $posX Int containing the current X-position of the robot
	* @param $posy Int containing the current y-position of the robot
	* @param $direction Int containing the direction of the robot
	* @param $health Int containing the health value of the robot
	* @param $lives Int containing the amount of lives of the robot
	* @param $alive Boolean containing the status if the robot is alive or not
	* @param $register1 Int containing the first card of the register slots
	* @param $register2 Int containing the second card of the register slots
	* @param $register3 Int containing the third card of the register slots
	* @param $register4 Int containing the fourth card of the register slots
	* @param $register5 Int containing the fifth card of the register slots
	* @param $lockedRegisters String containing the loeced register cards
	* @param $powerDownStatus Int containing the power down status of the robot
	* @param $nextCheckpoint Int containing the next checkpoint the robot has to take
    */
	public function __construct( $type, $spawnPosX, $spawnPosY, $posX, $posY, $direction, $health, $lives, $alive, $register1, $register2, $register3, $register4, $register5, $lockedRegisters, $powerDownStatus, $a_nextCheckpoint )
	{
		$this->type = $type;
		$this->spawnPosX = $spawnPosX;
		$this->spawnPosY = $spawnPosY;
		$this->posX = $posX;
		$this->posY = $posY;
		$this->direction = $direction;
		$this->health = $health;
		$this->lives = $lives;
		$this->alive = $alive;
		$this->register1 = $register1;
		$this->register2 = $register2;
		$this->register3 = $register3;
		$this->register4 = $register4;
		$this->register5 = $register5;
		$this->lockedRegisters = $lockedRegisters;
		$this->powerDownStatus = $powerDownStatus;
		$this->nextCheckpoint = $a_nextCheckpoint;
	}

	/**
	* function type
	* @return returns the type of the robot
	*/
	public function type()
	{
		return $this->type;
	}

	/**
	* function spawnPosX
	* @return returns the (re)spawn position-x if something happens to the robot
	*/
	public function spawnPosX()
	{
		return $this->spawnPosX;
	}

	/**
	* function spawnPosY
	* @return returns the (re)spawn position-y if something happens to the robot
	*/
	public function spawnPosY()
	{
		return $this->spawnPosY;
	}

	/**
	* function posX
	* @return returns the current position-x of the robot when t
	*/
	public function posX()
	{
		return $this->posX;
	}

	/**
	* function posY
	* @return returns the current position-y of the robot
	*/
	public function posY()
	{
		return $this->posY;
	}

	/**
	* function direction
	* @return returns the direction of the robot
	*/
	public function direction()
	{
		return $this->direction;
	}

	/**
	* function health
	* @return returns the health status of the robot
	*/
	public function health()
	{
		return $this->health;
	}

	/**
	* function lives
	* @return returns the amount of lives of the robot
	*/
	public function lives()
	{
		return $this->lives;
	}

	/**
	* function alive
	* @return returns the status if the robot is alive or not
	*/
	public function alive()
	{
		return $this->alive;
	}

	/**
	* function register1
	* @return returns the first card of the register slots
	*/
	public function register1()
	{
		return $this->register1;
	}

	/**
	* function register2
	* @return returns the second card of the register slots
	*/
	public function register2()
	{
		return $this->register2;
	}

	/**
	* function register3
	* @return returns the third card of the register slots
	*/
	public function register3()
	{
		return $this->register3;
	}

	/**
	* function register4
	* @return returns the fourth card of the register slots
	*/
	public function register4()
	{
		return $this->register4;
	}

	/**
	* function register5
	* @return returns the fifth card of the register slots
	*/
	public function register5()
	{
		return $this->register5;
	}

	/**
	* function lockedRegisters
	* @return returns the locked registers of the robot
	*/
	public function lockedRegisters()
	{
		return $this->lockedRegisters;
	}

	/**
	* function regispowerDownStatus
	* @return returns the power down status of the robot
	*/
	public function powerDownStatus()
	{
		return $this->powerDownStatus;
	}
	
	/**
	* function neaxtChekpoints
	* @return returns the next checkpoint a robot should take to to win
	*/
	public function nextCheckpoint()
	{
		return $this->nextCheckpoint;	
	}
	
}
